package com.heys.api;

import java.io.Console;
import java.io.File;
import java.io.FileNotFoundException;
import java.nio.file.Path;
import java.util.Scanner;

/**
 * Cons
 */
public class Cons {

    public static void main(String[] args) throws FileNotFoundException {
        // Scanner scanner = new Scanner(new File("a.txt"));
        // while(scanner.hasNextLine()){
        //     String in = scanner.nextLine();
        //     System.out.printf("输入的内容是：%s\n",in);
        // }
       Console console = System.console();
       String name = console.readLine("%s:", "请输入名称");
       char[] passwd = console.readPassword("%s:", "请输入密码");
       System.out.printf("您的姓名是：%s\n您的密码是：%s\n",name,new String(passwd));
    
    }
}